﻿/******************************************************************************
 * Copyright 2022-2032 ImperialVision Co., Ltd.
 * All right reserved. See COPYRIGHT for detailed Information.
 *
 * @file    DoubleSpinBox.h
 * @brief   浮点类型的SpinBox,防止鼠标在控件上方（未点击）时，响应滚轮滚动事件
 * @usage   1)Qt Designer创建一个QDoubleSpinBox然后提升，
 *          2)代码动态创建一个DoubleSpinBox实例
 *
 * @author  linxiaohao<linxiaohao@imperial-vision.com>
 * @date    2022/12/22
 *****************************************************************************/
#ifndef DOUBLESPINBOX_H
#define DOUBLESPINBOX_H

#include <QDoubleSpinBox>

class DoubleSpinBox : public QDoubleSpinBox
{
    Q_OBJECT
public:
    DoubleSpinBox(QWidget *parent = 0);

    // QWidget interface
protected:
    virtual void wheelEvent(QWheelEvent *event) override;
    virtual void mousePressEvent(QMouseEvent *event) override;

signals:
    void send_data(QString objName, QString data);
};

#endif // DOUBLESPINBOX_H
